package com.lightsaber.trade.as.dao.reta;

import org.springframework.stereotype.Repository;
import org.springside.modules.orm.Page;

import com.lightsaber.trade.as.entity.reta.OrderTemplate;
import com.lightsaber.trade.core.common.util.CurrentUser;
import com.lightsaber.trade.core.dao.BaseDao;

@Repository
public class OrderTemplateDao extends BaseDao<OrderTemplate, String> {

    public void findPage(OrderTemplate orderTemplate, Page<OrderTemplate> page) {
        eq("organization", CurrentUser.getOrg());
        
        if(orderTemplate!=null){
            like("name",orderTemplate.getName());
        }
        
        findPage(page);
    }
}

